#ifndef PUBCALLBACK_H
#define PUBCALLBACK_H
#include <iostream>
#include "callback.h"
#include "delivery_token.h"

class PubCallBack : public virtual mqtt::callback
{
public:
//    PubCallBack();

    void connection_lost(const std::string& cause) override
    {
        std::cout << "\nConnection lost" << std::endl;
        if (!cause.empty())
            std::cout << "\tcause: " << cause << std::endl;
    }

    void delivery_complete(mqtt::delivery_token_ptr tok) override {
        std::cout << "\tDelivery complete for token: "
            << (tok ? tok->get_message_id() : -1) << std::endl;
    }
};

#endif // PUBCALLBACK_H
